home *** CD-ROM | disk | FTP | other *** search
/ Practical Web Pages 2004 September / PracticalWebPages-WPG13-09-2004-Coverdisc.iso / pc / Software / Toolkit / Sothink SWF Quicker 1.5 / data1.cab / Public_Files / Effects / ActionScript / Rotate / Rotation2.sqe < prev    next >
Encoding:
Text File  |  2004-06-14  |  3.5 KB  |  116 lines

  1. ========== Description Part Begin ==========
  2. name = "Rotation2";
  3. description = "When a character rotates to a certain angle, the rotation of next character begins.";
  4. version = "1.00";
  5. bin = "rotation2.bin";
  6. ========== Description Part End ==========
  7.  
  8.  
  9. ========== Parameter Part Begin ==========
  10. $nCharacterCount(EDIT,INT,1,1 10000,"Total Characters ","The total characters using the special effect. The value is defined by the selected characters in the movie, but can not be changed in the property box.");
  11. $nFrameCount(EDIT,INT,3,3 3,"Total Frames","It indicates the total frames of actions. The total frames of the effect is probably more than it.");
  12. $nSpeed(EDIT,INT,3,1 50,"Fading Speed","The speed of character fading.");
  13. $nRotationSpeed(EDIT,INT,10,1 360,"Rotating Speed","The speed of character rotating.");
  14. $nScaleSpeed(EDIT,INT,10,1 100,"Scaling Speed","To control the speed of character scaling.");
  15. $nInterval(EDIT,INT,60,1 360,"Interval","The time difference between the former character and the latter one beginning to rotate.");
  16.  
  17. ========== Parameter Part End ==========
  18.  
  19.  
  20. ========== Function Part Begin ==========
  21. nCharacterCount = 8;
  22. nFrameCount = 3;
  23. nSpeed = 3;
  24. nRotationSpeed = 10;
  25. nScaleSpeed = 10;
  26. nInterval = 60;
  27.  
  28.  
  29. nCharacter_x = new Array(nCharacterCount);
  30. nCharacter_y = new Array(nCharacterCount);
  31. nIsRun = new Array(nCharacterCount);
  32. nWhoRun = 1;
  33. nOriginalSizeX = new Array(nCharacterCount);
  34. nOriginalSizeY = new Array(nCharacterCount);
  35.  
  36. for (i = 1; nCharacterCount >= i; i++)
  37. {
  38.     this["c" + i]._alpha = 100;
  39.     this["c" + i]._rotation = 0;
  40.     //this["c" + i]._xscale = 100;
  41.     //this["c" + i]._yscale = 100;
  42.     
  43.     nOriginalSizeX[i - 1] = this["c" + i ]._xscale;
  44.     nOriginalSizeY[i - 1] = this["c" + i ]._yscale;
  45.         
  46.     nCharacter_x[i - 1] = this["c" + i]._x;
  47.     nCharacter_y[i - 1] = this["c" + i]._y;
  48.     nIsRun[i - 1] = true;
  49. }
  50.  
  51.  
  52. function fun()
  53. {
  54.     for (i = 1; nCharacterCount >= i && nWhoRun >= i; i++)
  55.     {
  56.         if (nIsRun[i - 1])
  57.         {
  58.             this["c" + i]._xscale = this["c" + i]._xscale + nScaleSpeed;
  59.             this["c" + i]._yscale = this["c" + i]._yscale + nScaleSpeed;
  60.             this["c" + i]._alpha = this["c" + i]._alpha - nSpeed;
  61.             this["c" + i]._rotation = this["c" + i]._rotation + nRotationSpeed;
  62.             if (nInterval < this["c" + nWhoRun]._rotation)
  63.             {
  64.                 nWhoRun++;
  65.                 if (nCharacterCount < nWhoRun)
  66.                 {
  67.                     nWhoRun = nCharacterCount;
  68.                 } 
  69.             } 
  70.             if (this["c" + i]._alpha < 0)
  71.             {
  72.                 nIsRun[i - 1] = false;
  73.                 restart(i);
  74.             } 
  75.         } 
  76.     } 
  77.     if (nWhoRun == nCharacterCount && this["c" + nCharacterCount]._xscale == 100)
  78.     {
  79.         nWhoRun = 1;
  80.         i = 1;
  81.         while (nCharacterCount >= i)
  82.         {
  83.             nIsRun[i - 1] = true;
  84.             i++;
  85.         }
  86.     } 
  87.  
  88.  
  89.  
  90. function restart(nIndex)
  91. {
  92.     this["c" + nIndex]._x = nCharacter_x[nIndex - 1];
  93.     this["c" + nIndex]._y = nCharacter_y[nIndex - 1];
  94.     this["c" + i]._alpha = 100;
  95.     this["c" + i]._rotation = 0;
  96.     this["c" + i]._xscale = nOriginalSizeX[i - 1];
  97.     this["c" + i]._yscale = nOriginalSizeY[i - 1];
  98. }
  99.  
  100.  
  101. function again()
  102. {
  103.     gotoAndPlay(2);
  104. }
  105.  
  106.  
  107. ========== Function Part End ==========
  108.  
  109.  
  110. ========== Frame Part Begin ==========
  111. $frame(fun,1,-1,"fun");
  112. $frame(fun,2,-1,"fun");
  113. $frame(again,3,-1,"again");
  114. ========== Frame Part End ==========